# -*- encoding: utf-8 -*-
# @Time       :  19:47
# @Author     : yuxian
# @Email      : 1503889663@qq.com
# @File       : urls.py
# @SoftWare   : PyCharm
from django.urls import path
from rest_framework.routers import DefaultRouter
from book1.views import WordViewSet, ImageViewSet

urlpatterns = [
    path('key/<pk>/common', WordViewSet.as_view({'get': 'common_search'})),
    path('key/<pk>/advanced', WordViewSet.as_view({'get': 'advanced_search'})),
    path('image/bookName', ImageViewSet.as_view({'get': 'get_bookName'}))
]

router = DefaultRouter()
router.register('key', WordViewSet)
router.register('image', ImageViewSet)
urlpatterns += router.urls